import { BaseResponse } from "@/dtos/BaseDto";

export class BaseException extends BaseResponse {
  constructor(message: string = '服务器异常') {
    super();
    this.success = false;
    this.message = message;
  }
}

export class NotFoundException extends BaseException {
  constructor() {
    super('404 Not found!');
  }
}

export class NotLoginException extends BaseException {
  constructor() {
    super('请先登录');
  }
}

export class NoPermissionException extends BaseException {
  constructor() {
    super('没有权限');
  }
}
